package com.leetcode.LC_MED;

import java.util.HashMap;

public class LC1535 {
    public int getWinner(int[] arr, int k) {

        int win=arr[0],count=0;
        for (int i = 1; i < arr.length&&count<k; i++) {
            if (arr[i]<win){
                count++;
            }else {
                win=arr[i];
                count=1;
            }
        }
        return win;
    }
}
